package day4;
import java.util.Scanner;
public class D4_2 {
    public static void main(String[] args) {
        Scanner a=new Scanner(System.in);
        System.out.println("请输入存入金额：");
        int mony=a.nextInt();
        if (mony<1000){
            System.out.println("金额太少！(1000起存)");
        }
        System.out.println("请输入存储那年限：（一年、两年、三年、五年。）");
        int year=a.nextInt();
        double Mony=0;
        if (year==1){
            Mony=mony+mony*0.0225;
        }
        if (year==2){
            Mony=mony+mony*2*0.027;
        }
        if (year==3){
            Mony=mony+mony*3*0.0325;
        }
        if (year==5){
            Mony=mony+mony*5*0.036;
        }
        System.out.println(year+"年后的金额为："+Mony);
    }
}
